<template>
    <div class="branchtask">
        <div style="display: flex;justify-content: space-between;">
            <div>
                <el-input clearable v-model="sreach.keyword" style="width: 160px;" placeholder="输入任务名称/姓名查询" size="small" />
                <el-select v-model="sreach.fid" placeholder="请选择" size="small">
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                </el-select>
                <el-button type="primary" size="small" @click="todoSearch">搜索</el-button>
            </div>
            <div>
                <el-button type="primary" size="small" icon="el-icon-plus" @click="addTask">安排任务</el-button>
            </div>
        </div>

        <!-- 安排任务 -->
        <taskDialog :dialogForm="dialogForm" @cancel="cancel"></taskDialog>

        <div style="margin-bottom: 35px">
            <div class="taskTile">
                <!-- <div class="class_taskTile_left"> -->
                <h3>{{ '刘' }}</h3>
                <div>{{ '研发一部' }}</div>
                <!-- </div> -->
            </div>
            <el-table :data="tableData" border style="width: 100%">
                <el-table-column type="index" label="序号" width="100" align="center" fixed="left">
                </el-table-column>
                <el-table-column prop="functionGroupName" label="任务名称" width="600" align="center">
                </el-table-column>
                <el-table-column prop="reviewState" label="状态" align="center">
                    <span slot-scope="scope">{{
                        scope.row.reviewState == 0 ? "未确认" : "已确认"
                    }}</span>
                </el-table-column>
                <el-table-column prop="weekPartStr" label="关联项目" align="center">
                </el-table-column>
                <el-table-column prop="projectName" label="截止时间" align="center">
                </el-table-column>
                <el-table-column prop="pushTime" label="责任人" align="center">
                </el-table-column>
                <el-table-column prop="weekPlanMsg" label="其他参与人" align="canter">
                </el-table-column>
            </el-table>
        </div>
    </div>
</template>
<script>
import taskDialog from "./components/taskDialog.vue"
export default {
    components: { taskDialog },
    data() {
        return {
            sreach: {
                keyword: "",
                fid: "",
            },
            options: [],
            dialogForm: {
                dialogVisible: false,
                title: '',
                width: '40%'
            },
            tableData: [],
        }
    },
    methods: {
        todoSearch() {

        },
        addTask() {
            this.dialogForm.dialogVisible = !this.dialogForm.dialogVisible
            this.dialogForm.title = '安排任务'
        },
        cancel() {
            this.dialogForm.dialogVisible = !this.dialogForm.dialogVisible
        }
    },
}
</script>
<style lang="scss" scoped>
.taskTile {
    display: flex;
    align-items: center;
    margin: 10px 0px 0px 0px;
    padding: 0 10px;
    border: 1px solid #e8eef5;
    background: #f9f9f9;
    border-bottom: 0px;
    height: 50px;

    h3 {
        line-height: 50px;
        margin-right: 15px;
        font-size: 24px;
    }
}
</style>